﻿using System;
using ArunimaErp.Domain;

namespace ArunimaErp.Models
{
    public class MpsRepository
    {
        private arunimaEntities db = new arunimaEntities();

        public void CreateMps(int PoStyleId, DateTime ExitDate)
        {
            mps mps = new mps
            {
                PoStyleId = PoStyleId,
                DeliveryDate = ExitDate.AddDays(-1),
                ProductionStartDate = ExitDate.AddDays(-26),
                RmReadyDate = ExitDate.AddDays(-30)
            };

            db.mps.Add(mps);

            db.SaveChanges();
        }
    }
}